use strict;
use warnings;
use Test::More tests => 5;

use lib 't/lib';

BEGIN { use_ok 'Test::WWW::Mechanize::Catalyst', 'Askgene::Test' }

my $mech = Test::WWW::Mechanize::Catalyst->new;

$mech->get('/test/error/404');
ok( $mech->status == 404, 'sets status 404' );
$mech->content_like(
    qr|404 not found.*/test/error/404|,
    'displays custom 404 not found page'
);

$mech->get('/test/error/500');
ok( $mech->status == 500, 'sets status 500' );
$mech->content_like(
    qr/500 internal error.*testing 500/,
    'displays custom 500 not found page'
);
